package com.after.saas.common.model.query;

import com.after.saas.common.constants.SortEnum;
import com.after.saas.common.validate.EnumValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * @Classname UserQuery
 * @Description TODO
 * @Date 2021/5/31 16:43
 * @Created by hjchen
 */

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="用户查询对象", description="用户搜索条件")
public class UserQuery extends CommonQuery {


    @EnumValue(value = SortEnum.class,method = "getSort")
    @NotBlank(message = "排序方式不能为空")
    private String sort;

    @ApiModelProperty("用户名")
    private String username;

    /**
     * 账号
     */
    @ApiModelProperty("账号")
    private String account;

    /**
     * 昵称
     */
    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("密码")
    private String password;

    /**
     * 手机号
     */
    @ApiModelProperty("手机号")
    private String mobile;

    /**
     * 邮箱
     */
    @ApiModelProperty("邮箱")
    private String email;

}